<?php
ini_set("soap.wsdl_cache_enabled","0");

$service  = new SoapClient("http://208.74.72.210:8080/EnticeWS/services/billing3?wsdl");

$key = 'pass';
$key = mkResllerKey($key);

$xml = '<?xml version="1.0" encoding="UTF-8"?>
<EnticeRequest>
	<data>
		<row>
			<SUBSCRIBER_ID>041565409351933</SUBSCRIBER_ID>
			<PIN>1</PIN>
			<BALANCE>600</BALANCE>
			<TTL>720</TTL>
			<LIMIT>0</LIMIT>
			<PREPAID_CARD_SEQ>028300000001</PREPAID_CARD_SEQ>
			<REMARK>1</REMARK>
			<USER_NAME>tuan</USER_NAME>
			<PASSWORD>tuan</PASSWORD>
			<ALT_ID>1</ALT_ID>
			<ACCESS_CODE_ALWAYS>true</ACCESS_CODE_ALWAYS>
			<contact operation="add">
		         <CONT_ID>1</CONT_ID>
		         <LASTNAME>LastName-Add</LASTNAME>
		         <FIRSTNAME>FirstName-Add</FIRSTNAME>
		         <TITLE>title</TITLE>
		         <PHONE_NUM>0123456789</PHONE_NUM>
		         <FAX_NUM>111</FAX_NUM>
		         <MOBILE_NUM>0121323</MOBILE_NUM>
		         <EMAIL>quoctuan261@gmail.com</EMAIL>
		         <CONTACT_TYPE_ID>1</CONTACT_TYPE_ID>
		         <COMPANY>Toplink</COMPANY>
		         <ADDRESS1>Algade 1</ADDRESS1>
		         <ADDRESS2>Lilleby</ADDRESS2>
		         <CITY>Horsens</CITY>
		         <STATE>1</STATE>
		         <POSTAL>8700</POSTAL>
		         <COUNTRY>US</COUNTRY>
		       </contact>
		</row>
	</data>
</EnticeRequest>';

$data = $service->updateSubscriber('12',$key, $xml);

//header('Content-type: text/xml');
var_dump($data);

function mkResllerKey($key)
{
	$dt = gmdate("m/d/Y", time());
	$key =substr($dt,0,6).$key.substr($dt, 5);
	return md5($key);
}